package com.javalong.mir.common.util;

import java.io.UnsupportedEncodingException;

/**
 * 编码工具类
 * 
 * @author Administrator
 *
 */
public class CodeUtils {

	/**
	 * 返回微信的xml字符串，统一转码处理
	 * 
	 * @param originalXml
	 * @return
	 */
	public static String encodeResponseXml(String originalXml) {
		if (originalXml == null) {
			return null;
		}
		try {
			return new String(originalXml.getBytes("utf-8"), "ISO8859_1");
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		}
		return null;
	}
}
